<template>
  <div id="app">
    <div id="nav">

        <router-link class="left" to="/">驾考测试</router-link>
        <router-link class="right" to="/about">考生信息</router-link>

    </div>
    <div class="line"></div>
<!--    keep-alive 保持页面活性-->
    <keep-alive>
      <router-view/>
    </keep-alive>

    <div class="loading" v-if="$store.state.loading">
      <el-image
          style=" width: 150px; height: 150px ;"
          :src="require('./assets/loading.png')" fit="fit" >
      </el-image>
      <div class="">加载中...</div>
    </div>

  </div>
</template>
<script>
export default {
  data() {
    return {

    };
  },
  methods: {}
};
</script>
<style>
/*重置样式*/
*{
  margin: 0;
  padding: 0;
}
.loading{
  z-index: 999;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.5);
  position: fixed;
  top: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;

  min-height: 100vh;
  background-repeat: repeat;
  background-image: url("../src/assets/bg.png");
  background-size: 800px;
  background-color: #f1f3f4;
}

#nav {
  padding: 30px;
}
#nav a {
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
  background-color:  #ecf5ff;
  padding: 10px;
  /*box-shadow: 0px 0 10px -5px #2c3e50 ;*/

}
.left{
  border-radius: 10px 0 0 10px;
}
.right{
  border-radius: 0 10px   10px 0;
}
#nav a.router-link-exact-active {
  color: #fff;
  background-color: #409eff;
  /*color: #409eff;*/
}
</style>
